<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>用户信息</title>
</head>

<body>
	<div class="pd-20">
		<input type="hidden" id="getsex"
			value='<s:property value="#obj.sex"/>' />

		<form action="back_updateInfo.etask" method="post" class="form form-horizontal" enctype="multipart/form-data"  accept-charset="utf-8"
			id="form-member-add">
			<input type="hidden" id="userid" name="userid"
			value='<s:property value="#userid"/>' />
			<div class="row cl">
				<label class="form-label col-3">头像：</label>
				<div class="formControls col-5">
					<img class="avatar size-XL l" id="imgPreview"
						src="<%=sourcePath%><s:property value="#request.obj.headerimage" /> ">
					<span class="btn-upload form-group"> <a
						href="javascript:void();"
						class="btn btn-primary radius upload-btn"><i
							class="Hui-iconfont">&#xe642;</i> 浏览文件</a> <input type="file"
						onchange="changeImg(this)" name="file" class="input-file">
					</span>
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>用户名：</label>
				<div class="formControls col-5">
					<input type="text" class="input-text"
						value='<s:property value="#obj.nickname" />' placeholder=""
						id="member-name" name="nickname" datatype="*2-16"
						nullmsg="用户名不能为空">
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>手机：</label>
				<div class="formControls col-5">
					<input type="text" class="input-text"
						value='<s:property value="#obj.mobile" />' readonly placeholder=""
						id="member-tel" name="mobile" datatype="m" nullmsg="手机不能为空">
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3"><span class="c-red">*</span>性别：</label>
				<div class="formControls col-5 skin-minimal">
					<div class="radio-box">
						<label for="sex-1">男</label> <input type="radio" id="sex-1"
							value="男" checked="false" name="sex" datatype="*" nullmsg="请选择性别！">
					</div>
					<div class="radio-box">
						<label for="sex-2">女</label> <input type="radio" id="sex-2"
							value="女" checked="false" name="sex">
					</div>
					<div class="radio-box">
						<label for="sex-3">保密</label> <input type="radio" id="sex-3"
							value="保密" checked="false" name="sex">
					</div>
				</div>
				<div class="col-4"></div>
			</div>

			<div class="row cl">
				<label class="form-label col-3">擅长的服务：</label>
				<div class="formControls col-5">
					<textarea name="skill" cols="" rows="" class="textarea"
						placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true"
						nullmsg="备注不能为空！" onKeyUp="textarealength(this,100)"><s:property value="#obj.skill" /></textarea>
					<p class="textarea-numberbar">
						<em class="textarea-length"></em>/100
					</p>
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3">工作经验：</label>
				<div class="formControls col-5">
					<textarea name="experience" cols="" rows="" class="textarea"
						placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true"
						nullmsg="备注不能为空！" onKeyUp="textarealength(this,100)"><s:property value="#obj.experience" /></textarea>
					<p class="textarea-numberbar">
						<em class="textarea-length"></em>/100
					</p>
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<label class="form-label col-3">二维码：</label>
				<div class="formControls col-5">
					<img class="avatar size-XL l" id="qrCode"
						src="<%=sourcePath%><s:property value="#obj.qrCode" /> ">
				</div>
				<div class="col-4"></div>
			</div>
			<div class="row cl">
				<div class="col-9 col-offset-3">
					<input class="btn btn-primary radius" type="submit"
						value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>
	<script type="text/javascript"
		src="lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass : 'icheckbox-blue',
				radioClass : 'iradio-blue',
				increaseArea : '20%'
			});

			$("#form-member-add").Validform({
				tiptype : 2,
				callback : function(form) {
					form[0].submit();
					var index = parent.layer.getFrameIndex(window.name);
					parent.$('.btn-refresh').click();
					parent.layer.close(index);
				}
			});


		
			var msg = "${message}";
			if (msg != '') {
				alert(msg);
			}


			var getsex = $("#getsex").val();
			alert(getsex);
			if(getsex=="男"){
			
			 $("#sex-1").attr("checked",true);
			alert(getsex);
			}else if(getsex=="女"){
			 $("#sex-2").attr("checked",true);
			alert(getsex);
			}else if(getsex==""){
			 $("#sex-3").attr("checked",true);
			alert(getsex);
			}
		});

		function changeImg(imgFile) {

			var pattern = /(\.*.jpg$)|(\.*.png$)/;
			if (!pattern.test(imgFile.value)) {
				alert("系统仅支持jpg/png格式的照片！");
				imgFile.focus();
			} else {
				var path;
				if (document.all)//IE
				{
					imgFile.select();
					path = document.selection.createRange().text;
					document.getElementById("imgPreview").innerHTML = "";
					document.getElementById("imgPreview").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\""
							+ path + "\")";//使用滤镜效果
				} else//FF
				{
					path = URL.createObjectURL(imgFile.files[0]);
					document.getElementById("imgPreview").setAttribute("src",
							path);
				}
			}
		}

	</script>
</body>
</html>